package cn.leaf.database.util;

import cn.leaf.database.entity.Search;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 *
 * description: 分页工具类
 *
 * @author twinkle leaf
 * @version v1.0.0
 * @since 2021-11-07 09:36:00
 * slogan: There are no two identical leaves in the world.
 *
 */
public class PageUtil {

	public static <T> IPage<T> getPage(Search search) {
		return new Page<T>(search.getCurrent(), search.getSize());
	}
}
